<?php
use backend\assets\AppAsset;
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use common\widgets\Alert;
AppAsset::register($this);
$this->title = "投诉监控";
?>
<?php $this->beginPage() ?>
    <!doctype html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="chrome=1">
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
        <?php $this->registerJsFile("http://webapi.amap.com/maps?v=1.4.2&key=".yii::$app->params['GaoDeMapApiKey']);?>
        <?= Html::csrfMetaTags() ?>
        <?php $this->head() ?>
        <style type="text/css">
            body,html,#container{
                height: 100%;
                margin: 0px;
            }
            #loadingTip {
                position: absolute;
                z-index: 9999;
                top: 0;
                left: 0;
                padding: 3px 10px;
                background: red;
                color: #fff;
                font-size: 18px;
                margin-top:100px;
            }

            #tip {
                background-color: #ddf;
                color: #333;
                border: 1px solid silver;
                box-shadow: 3px 4px 3px 0px silver;
                position: absolute;
                top: 80px;
                right: 10px;
                border-radius: 5px;
                overflow: hidden;
                line-height: 20px;
            }
            #tip input[type="text"] {
                height: 25px;
                border: 0;
                padding-left: 5px;
                width: 280px;
                border-radius: 3px;
                outline: none;
            }
            .bottomcut{position:fixed;bottom:0;left:0;z-index:9999;width:100%;}
            *html .bottomcut{position:absolute;}
            .bottomcut{height:40px;line-height:40px;font-size:12px;background:#222;}
            .bottomcut h1{font-size:14px;font-family:"Helvetica Neue","宋体";}
            .bottomcut a,.bottomcut h1{padding:0px 10px;letter-spacing:1px;color:#FFF;display:block;float:left;}
            .bottomcut a:hover{background:#DDD;}
            .bottomcut span.right{float:right;}
            .bottomcut span.left{float:left;}
            .bottomcut span.right a{float:left;display:block;}

            /* 投诉清单样式 */
            /* Border styles */
            #table-1 thead, #table-1 tr {
                border-top-width: 1px;
                border-top-style: solid;
                border-top-color: rgb(230, 189, 189);
            }
            #table-1 {
                border-bottom-width: 1px;
                border-bottom-style: solid;
                border-bottom-color: rgb(230, 189, 189);
            }
            /* Padding and font style */
            #table-1 td, #table-1 th {
                padding: 5px 10px;
                font-size: 12px;
                font-family: Verdana;
                color: rgb(177, 106, 104);
                line-height:18px;
            }
            /* Alternating background colors */
            #table-1 tr:nth-child(even) {
                background: rgb(238, 211, 210)
            }
            #table-1 tr:nth-child(odd) {
                background: #FFF
            }
        </style>
    </head>
    <input>
    <?php
    NavBar::begin([
        'brandLabel' => 'GTL监控平台',
        'brandUrl' => Yii::$app->homeUrl,
        'options' => [
            'class' => 'navbar-inverse navbar-fixed-top',
        ],
    ]);
    //导航开始
    if (Yii::$app->user->isGuest) {
        $menuItems[] = ['label' => '登录', 'url' => ['/site/login']];
    } else {
        $menuItems[] =['label' => '首页', 'url' => ['/site/index']];
        $menuItems[] =['label' => '投诉监控', 'url' => ['/tousu/index']];
        $menuItems[] =['label' => 'G网指标监控', 'url' => ['/tousu/index1']];
        $menuItems[] =['label' => 'T网指标监控', 'url' => ['/tousu/index1']];
        $menuItems[] =['label' => 'L网指标监控', 'url' => ['/tousu/index1']];
        $menuItems[] =['label' => '弱覆盖分析', 'url' => ['/tousu/index1']];
        $menuItems[] =['label' => '参数优化', 'url' => ['/tousu/index1']];
        $menuItems[] =['label' => '系统设置', 'url' => ['/tousu/index1']];
        $menuItems[] =[
            'label' => '我('. Yii::$app->user->identity->username .')',
            'items' => [
                [
                    'label' => '管理员帐号管理',
                    'url' => ['/manager/index'],
                ],
                [
                    'label' => '安全退出',
                    'url' => ['site/logout'],
                ]
            ]
        ];
    }
    //导航结束
    echo Nav::widget([
        'options' => ['class' => 'navbar-nav navbar-right'],
        'items' => $menuItems,
    ]);
    NavBar::end();
    ?>
    <div id="container" tabindex="0"></div>
    <div id="tip">
        <input type="text" id="keyword" name="keyword" value="按地名搜索" onfocus='this.value=""'/>
    </div>
    <!--底部固定菜单（开始）-->
    <div class="bottomcut">
        <span class="left">
            <a>搜索</a>
            <input type="text" id="sreachinput" value="搜索基站或投诉" onfocus='this.value=""' style="line-height:normal;width:300px;">
            <span id="loadcheckbox" style="margin-left: 20px;color: #ffffff;display: none;">加载图层&nbsp&nbsp
                    <input type="radio" name="checkbox" id="gchechbox" >G&nbsp&nbsp
                    <input type="radio" name="checkbox" id="tchechbox" >T&nbsp&nbsp
                    <input type="radio" name="checkbox" id="lchechbox" >L&nbsp&nbsp
                    <input type="radio" name="checkbox" id="gtlchechbox" >GTL
                    <input type="radio" name="checkbox" id="nullchechbox" checked="checked">NULL
            </span>
            <span id="state" style="margin-left: 20px;color: #ffffff;"></span>
        </span>
        <span class="right" id="tousumenu" style="display: none;">
            <a data-target="#tousulistcontent" data-toggle="modal">投诉清单(<span style='color:red;' id="tousucount"></span>)</a>
            <div class="modal fade" id="tousulistcontent" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal"
                                    aria-hidden="true">×
                            </button>
                            <h4 class="modal-title" id="myModalLabel">
                                投诉清单
                            </h4>
                        </div>
                        <div class="modal-body">
                            <table id="table-1">
                                <thead>
                                    <th >工单号</th>
                                    <th >投诉内容</th>
                                    <th >时限</th>
                                </thead>
                                <tbody id="tousutabledata">
                                </tbody>
                            </table>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default"
                                    data-dismiss="modal">关闭
                            </button>
                        </div>
                    </div><!-- /.modal-content -->
                </div><!-- /.modal-dialog -->
            </div><!-- /.modal -->
            <a href="">已定位投诉清单(<span style="color:red;">8</span>)</a>
            <a href="">无发定位投诉清单(<span style="color:red;">2</span>)</a>
	    </span>
    </div>
    </body>
    </html>
<?php $this->endBody() ?>
    <script type="application/javascript">
    </script>
    <?php $this->registerJsFile("@web/js/jquery.jsonp-2.1.4.js");?>
    <?php $this->registerJsFile("@web/js/mapcontroller.js");?>
    <?php $this->registerJsFile("@web/js/main.js");?>
    </body>
    <script type="text/javascript">
        $(document).ready(function(){
            $(window).scroll(function(){
                if($.browser.msie && $.browser.version=="6.0")$(".bottomcut").css("top",$(window).height()-$(".bottomcut").height()+$(document).scrollTop());
            });

            //获取GTL网络对象资源
            GetGTLShapeArray();

            //只能选一个chechbox
            $('inputp[type=checkbox]').click(function(){
                $(this).attr('checked','checked').siblings().removeAttr('checked');
            });
        })

        //加载gsm图层事件
        $("#gchechbox").change(function() {
            //开始生成基站扇区图层
            var gzoom = map.getZoom();
            var gcenter = map.getCenter();
            map.destroy();
            InitMap(gzoom,gcenter);
            MakeShapeInMap(2);
        });

        //加载td图层事件
        $("#tchechbox").change(function() {
            //开始生成基站扇区图层
            var tzoom = map.getZoom();
            var tcenter = map.getCenter();
            map.destroy();
            InitMap(tzoom,tcenter);
            MakeShapeInMap(3);
        });

        //加载lte图层事件
        $("#lchechbox").change(function() {
            //开始生成基站扇区图层
            var lzoom = map.getZoom();
            var lcenter = map.getCenter();
            map.destroy();
            InitMap(lzoom,lcenter);
            MakeShapeInMap(4);
        });

        //加载GTL图层事件
        $("#gtlchechbox").change(function() {
            //开始生成基站扇区图层
            var gtlzoom = map.getZoom();
            var gtlcenter = map.getCenter();
            map.destroy();
            InitMap(gtlzoom,gtlcenter);
            MakeShapeInMap(234);
        });

        //情况基站图层
        $("#nullchechbox").change(function() {
            //开始生成基站扇区图层
            var gtlzoom = map.getZoom();
            var gtlcenter = map.getCenter();
            map.destroy();
            InitMap(gtlzoom,gtlcenter);
        });

    </script>
    </html>
<?php $this->endPage() ?>